package com.javaee.ch11.web;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/admin")
public class Router {
    @GetMapping("/{filename}")
    public String toPage(@PathVariable String filename) {
        return filename;
    }

//    @GetMapping("/file/comp")
//    public String toComponent() {
//        return "/component-demo/file-comp-ex";
//    }
//
//    @GetMapping("/parent-comp")
//    public String toParentComponent() {
//        return "/component-demo/ParentComponent";
//    }
//
//    @GetMapping("/myaxios")
//    public String toAxios( ) {
//        return "/component-demo/axiosInstance-ex1";
//    }
//
//    @GetMapping("/simple-fileupload")
//    public String simpleFileUpload( ) {
//        return "/fileupload/simple-fileupload";
//    }

    @GetMapping("/login")
    public String login( ) {
        return "/login";
    }

    @GetMapping("/book")
    public String toBook() {
        return "/book";
    }

    @GetMapping("/bookCategory")
    public String bookCategory() {
        return "/bookCategory";
    }

    @GetMapping("/reader")
    public String toReader() {
        return "/reader";
    }

    @GetMapping("/department")
    public String todepartment() {
        return "/department";
    }
}


